package com.im.partchat.topic.tools;

import com.im.partchat.topic.bean.AvatarBean;
import com.im.partchat.topic.bean.BaseResponse;
import com.im.partchat.topic.bean.CommentListResponse;
import com.im.partchat.topic.bean.PraiseResponse;
import com.im.partchat.topic.bean.StringResponse;
import com.im.partchat.topic.bean.TopicListResponse;

import java.util.List;

public class JsonParser {

	public static StringResponse getStringResponse(String json) {
		StringResponse response = JsonUtil.getObject(json, StringResponse.class);
		return response;
	}
	
	public static TopicListResponse getTopicListResponse(String json) {
		TopicListResponse response = JsonUtil.getObject(json, TopicListResponse.class);
		return response;
	}
	public static CommentListResponse getCommentListResponse(String json) {
		CommentListResponse response = JsonUtil.getObject(json, CommentListResponse.class);
		return response;
	}
	public PraiseResponse getPraiseResponse(String json) {
		PraiseResponse response = JsonUtil.getObject(json, PraiseResponse.class);
		return response;
	}
	
	public static StringResponse getStringResponse2(String json) {
		StringResponse response = JsonUtil.getObject(json, StringResponse.class);
		return response;
	}	

	public static AvatarBean getAvatarBean(String json) {
		AvatarBean response = JsonUtil.getObject(json, AvatarBean.class);
		return response;
	}

	public static List<String> getStringList(String json) {
		List<String> list = JsonUtil.getArray(json, String.class);
		return list;
	}
	
	public static BaseResponse getBaseResponse(String json) {
		BaseResponse rr = JsonUtil.getObject(json, BaseResponse.class);
		return rr;
	}

}
